#include "glad/glad.h"
#include "GLFW/glfw3.h"
#include "Kptv3.h"

#include <iostream>
#include <memory>

int main(int argc, char const *argv[])
{
    auto win = std::make_shared<kptv3::Window>(
        kptv3::WindowConfig{"KPT_v3", 400, 300, false, true}
    );

    bool is_open = true;

    win->AddCloseCallBack([&](){
        is_open=false;
    });
    win->AddKeyPressedCallBack([&](kptv3::KeyCode k){
        if(k == kptv3::Key::Escape){
            is_open=false;
        }
    });

    auto shader = kptv3::Shader::Create("../assets/shader/kptv3.vert",
                                        "../assets/shader/kptv3.frag");

    while(is_open)
    {
        glClearColor(1.f, 1.f, 1.f, 1.f);
        glClear(GL_COLOR_BUFFER_BIT);

        win->Display();
    } 

    return 0;
}
